package com.fuershiye.woman.monitor.constants;

import com.google.common.collect.Lists;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public enum Roles {

	//管理员，系统
	ROLE_CODE_ADMIN("admin"),

	//管理员，省级
	ROLE_CODE_ADMIN_PROVINCE("admin_province"),
	//管理员，地市
	ROLE_CODE_ADMIN_CITY("admin_city"),
	//管理员，区县
	ROLE_CODE_ADMIN_COUNTY("admin_county"),

	//角色，省级统计
	ROLE_CODE_TONGJI_PROVINCE("tongji_province"),
	//角色，地市级统计
	ROLE_CODE_TONGJI_CITY("tongji_city"),
	//角色，区县级统计
	ROLE_CODE_TONGJI_COUNTY("tongji_county"),

	;


	private String value;

	private Roles(String value) {
		this.value = value;
	}

	public String getValue() {
		return value;
	}

	private static final List<Roles> all = Lists.newArrayList();

	static {
		for (final Roles p : EnumSet.allOf(Roles.class)) {
			all.add(p);
		}
	}

	public Roles getMasterRole() {
		return ROLE_CODE_ADMIN;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
	}



}
